package com.cscp.javastudy.juc.volatiledemo;

/**
 * 静态内部类实现单例
 */
public class SingletonDemo3 {

    private SingletonDemo3(){}

    public static class InnerClass{
        private static final SingletonDemo3 instance = new SingletonDemo3();
    }

    public static SingletonDemo3 getInstance(){
        return InnerClass.instance;
    }


}
